.TH std::basic_streambuf::pubseekpos, 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::basic_streambuf::pubseekpos, \- std::basic_streambuf::pubseekpos,

.SH Synopsis

   pos_type pubseekpos( pos_type pos,
                        std::ios_base::openmode which = std::ios_base::in |        \fB(1)\fP
   std::ios_base::out );
   protected:

   virtual pos_type seekpos( pos_type pos,                                         \fB(2)\fP

                             std::ios_base::openmode which = std::ios_base::in |
   std::ios_base::out );

   Sets the position indicator of the input and/or output sequence to an absolute
   position.

   1) Calls seekpos(pos, which) of the most derived class.
   2) The base class version of this function has no effect. The derived classes may
   override this function to allow absolute positioning of the position indicator.

.SH Parameters

   pos   - absolute position to set the position indicator to
           defines which of the input and/or output sequences to affect. It can be one
           or a combination of the following constants:
   which -
           Constant Explanation
           in       affect the input sequence
           out      affect the output sequence

.SH Return value

   1) The return value of seekpos(pos, which).
   2) The resulting absolute position as defined by the position indicator. The base
   class version returns pos_type(off_type(-1)).

.SH Example

    This section is incomplete
    Reason: no example

   Defect reports

   The following behavior-changing defect reports were applied retroactively to
   previously published C++ standards.

     DR   Applied to        Behavior as published               Correct behavior
                     the base class version of seekpos
   LWG 55 C++98      returned                            returns pos_type(off_type(-1))
                     an undefined invalid stream
                     position

.SH See also

   pubseekoff invokes seekoff()
              \fI(public member function)\fP
   seekpos    repositions the file position, using absolute addressing
   \fB[virtual]\fP  \fI(virtual protected member function of std::basic_filebuf<CharT,Traits>)\fP

              repositions the next pointer in the input sequence, output sequence, or
   seekpos    both using absolute addressing
   \fB[virtual]\fP  \fI\fI(virtual protected member function\fP of\fP
              std::basic_stringbuf<CharT,Traits,Allocator>)
   seekpos    repositions the next pointer in the input sequence, output sequence, or
   \fB[virtual]\fP  both using absolute addressing
              \fI(virtual protected member function of std::strstreambuf)\fP

.SH Category:
     * Todo no example
